﻿CREATE PROCEDURE [acms].[CustomAdminPage_Delete]
	@Id int,
	@ConcurencyId rowversion
AS
	Update acms.[CustomAdminPage]
	set Deleted = 1 
	where Id = @Id and ConcurencyId = @ConcurencyId and Deleted = 0
	
	if(@@rowcount = 1)
		RETURN 0;
	else if Exists (Select null from [CustomAdminPage] where Id = @Id and Deleted = 0)
		RETURN -100
	else
		RETURN -200